import Layout from "@/layout/index.vue";
// 静态路由（默认路由）
export const staticRoutes = [
  {
    path: "/",
    component: () => import("@/layout/index.vue"),
    redirect: "/home",
    children: [
      {
        path: "/home",
        name: "Home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          icon: "el-icon-sunny"
        }
      }
    ]
  },
  {
    path: "/product",
    name: "Product",
    component: Layout,
    redirect: "/product/trademark/list", // 自动重定向到默认子路由
    meta: {
      title: "商品管理",
      icon: "el-icon-shopping-bag-1"
    },
    hidden: false, // 是否在导航菜单中隐藏, 默认就是不隐藏
    children: [
      {
        path: "trademark",
        name: "Trademark",
        component: () => import("@/views/product/Trademark/list.vue"),
        meta: {
          title: "品牌管理"
        }
      },
      {
        path: "attr",
        name: "Attr",
        component: () => import("@/views/product/Attr/list.vue"),
        meta: {
          title: "平台管理"
        }
      },
      {
        path: "spu",
        name: "Spu",
        component: () => import("@/views/product/Spu/list.vue"),
        meta: {
          title: "SPU管理"
        }
      },
      {
        path: "sku",
        name: "Sku",
        component: () => import("@/views/product/Sku/list.vue"),
        meta: {
          title: "SKU管理"
        }
      },
      {
        path: "category",
        name: "Category",
        component: () => import("@/views/product/Category/list.vue"),
        meta: {
          title: "分类管理"
        }
      }
    ]
  },
  {
    path: "/acl",
    name: "Acl",
    component: Layout,
    redirect: "/acl/user/list",
    meta: {
      title: "权限管理",
      icon: "el-icon-user"
    },
    children: [
      {
        name: "User",
        path: "/acl/user/list",
        component: () => import("@/views/acl/user/index.vue"),
        meta: {
          title: "用户管理"
        }
      },

      {
        name: "RoleAuth",
        path: "/acl/role/auth",
        component: () => import("@/views/acl/role/roleAuth.vue"),
        meta: {
          title: "角色管理",
          hidden: true,
          activeMenu: "/acl/role/list"
        }
      },
      {
        name: "Permission",
        path: "/acl/permission/list",
        component: () => import("@/views/acl/permission/index.vue"),
        meta: {
          title: "菜单管理"
        }
      }
    ]
  },

  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      hidden: true
    }
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/error/404.vue"),
    meta: {
      hidden: true
    }
  },

  /* 权限管理路由 start */

  // {
  //   path: "/acl",
  //   name: "Acl",
  //   component: () => import("@/layout/index.vue"),
  //   redirect: "/acl/user/list",
  //   meta: {
  //     title: "权限管理",
  //     icon: "ele-Setting"
  //   },
  //   children: [
  //     {
  //       name: "User",
  //       path: "/acl/user/list",
  //       component: () => import("@/views/acl/user/index.vue"),
  //       meta: {
  //         title: "用户管理"
  //       }
  //     },
  //     {
  //       name: "Role",
  //       path: "/acl/role/list",
  //       component: () => import("@/views/acl/role/index.vue"),
  //       meta: {
  //         title: "角色管理"
  //       }
  //     },
  //     {
  //       name: "RoleAuth",
  //       path: "/acl/role/auth",
  //       component: () => import("@/views/acl/role/roleAuth.vue"),
  //       meta: {
  //         title: "角色管理",
  //         hidden: true,
  //         activeMenu: "/acl/role/list"
  //       }
  //     },
  //     {
  //       name: "Permission",
  //       path: "/acl/permission/list",
  //       component: () => import("@/views/acl/permission/index.vue"),
  //       meta: {
  //         title: "菜单管理"
  //       }
  //     }
  //   ]
  // },
  {
    path: "/:pathMatch(.*)",
    name: "Any",
    redirect: "/404",
    meta: {
      hidden: true
    }
  }
];

// 动态路由

// 定义任意路由

/* 匹配任意的路由 必须最后注册 */
// export const anyRoutes = [];
